{% extends "base.html" %}
{% block title %}任务管理{% endblock %}
{% block navbar %}{{ super() }}{% endblock %}

{% block styles %}{{ super() }}
<style>
  .main-div {
    background: #ffffff none repeat scroll 0 0;
    border-radius: 2px;
    margin: 10px auto 30px;
    max-width: 80%;
    padding: 20px 20px 20px 20px;
  }

  body {
    padding-top: 100px;
  }
</style>
{% endblock %}

{% block scripts %}{{super()}}
<script>
  $(document).ready(function () {
    $('#dt').DataTable(
      {
        "autoWidth": false,
        "search": {
          "regex": true
        }
      });
  });
</script>
{% endblock %}

{% block content %}
<div class="container">
  {% include 'flash_message.html' %}
  <table id="dt" class="row-border hover compact" style="width:100%">
    <thead>
      <tr>
        <th>任务</th>
        <th>日期</th>
        <th>工时</th>
        <th>大类</th>
        <th>分类</th>
        <th>工号</th>
        <th>姓名</th>
        <th>工作令号</th>
        <th>项目名称</th>
      </tr>
    </thead>
    <tbody>
      {% for data in datas %}
      <tr>
        <td>{{ data[0] }}</td>
        <td>{{ data[1] }}</td>
        <td>{{ data[2] }}</td>
        <td>{{ data[3] }}</td>
        <td>{{ data[4] }}</td>
        <td>{{ data[5] }}</td>
        <td>{{ data[6] }}</td>
        <td>{{ data[7] }}</td>
        <td>{{ data[8] }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endblock %}